package com.chuanyin.mp3player;

import android.os.Bundle;
import android.widget.ImageButton;
import android.widget.TextView;

import com.chuanyin.mp3player.commons.AndroidUtil;
import com.chuanyin.mp3player.process.ButtonProcess;
import com.chuanyin.mp3player.process.MainOptionsProcess;

public class MainActivity extends BaseActivity {
	public static boolean loadMainLayout = false;
	public  TextView playTitleTxt;
	
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        init();
    }
    
    @Override
	protected void onSaveInstanceState(Bundle outState) {
		super.onSaveInstanceState(outState);
	}



	public  void init(){
    	setContentView(R.layout.main);
    	playTitleTxt = (TextView)findViewById(R.id.playTimeTxt);
    	MainOptionsProcess mainOptionProcess = AndroidUtil.getMainOptionProcess(this);
//    	if(mainOptionProcess!=null){
//    		mainOptionProcess.loadMainView();
//    	}else{
    		AndroidUtil.setMainOptionProcess(this, new MainOptionsProcess(this));
    		mainOptionProcess = AndroidUtil.getMainOptionProcess(this);
    		mainOptionProcess.loadMainView();
//    	}
    	setmMainButtonProcess(new ButtonProcess(this));
    }
	
	 
}